home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 2
/
Nebula Two.iso
/
SourceCode
/
GameKit
/
gamekit-1
/
RandomBonusTracker.m
< prev
next >
Wrap
Text File
|
1995-06-12
|
298b
|
24 lines
#import <gamekit/gamekit.h>
#import <bsd/libc.h>
@implementation RandomBonusTracker
- init
{
[super init];
increment = 1;
srandom(time(0));
return self;
}
- (int)bonusValue
{
int range = ((max - min) / increment) + 1;
value = (random() % range) * increment + min;
return value;
}
@end